{% extends "personal_center/base.html" %}

{% block page_link %}
    <link rel="stylesheet" href="../../static/system_setup/css/style.css">
{% endblock %}


{% block style %}
    <style>
        .add_class {
            background: #1E90FF;
        }
        tr {
            height: 35px;
        }
        th {
            text-align: center;
        }
        table {
            table-layout: fixed;border-collapse: collapse;
        }
        .model_li {
            color: #3f414d;width: 25%;cursor: pointer;display: none;
        }
        .top_tag {
            border-bottom: #01AAED solid 2px;color: #01AAED;
        }
        table td {
            padding-right: 10px;
        }
        #ytyj table td {
            border: #cfcfcf solid 1px;width: auto;
         }
        #ytnr table td {
            border: #cfcfcf solid 1px;width: auto;
         }
        #jjfa table td {
            border: #cfcfcf solid 1px;width: auto;
         }
        .tab_top {
            width: 100px;height: 40px;line-height: 40px;text-align: center;display: inline-block;cursor: pointer;
        }
        .file {
            position: relative;display: inline-block;background: #D0EEFF;border: 1px solid #99D3F5;border-radius: 4px;padding: 4px 12px;overflow: hidden;color: #1E88C7;text-decoration: none;text-indent: 0;line-height: 20px;
        }
        .file input {
            position: absolute;font-size: 100px;right: 0;top: 0;opacity: 0;
        }
        .file:hover {
            background: #AADFFD;border-color: #78C3F3;color: #004974;text-decoration: none;
        }
        #dowload_ul li {
            white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis;overflow: hidden;font-size: 14px;margin-left: 3%;height: 30px;
        }
        .button_for_control {
            width: 90px;height: 30px;border: 1px solid #99D3F5;background: #D0EEFF;border-radius: 4px;letter-spacing: 0;line-height: 30px;color: #089bab;margin: 5px 0;
        }
        #page_one button:hover {
            color: red;
        }
        .a_tag_cla{
            display: block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;height: 30px;line-height: 30px;padding-left: 1%;
        }
        .shade {
            position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: rgba(36, 36, 36, 0.5);display: none;z-index: 10000;
        }
    </style>
{% endblock %}


{% block right_content %}
    <div style="width: 100%;height: 40px;background: white;border-bottom: #A9A9A9 solid 0.5px;line-height: 40px;padding-left: 1%;color: black;">
    <div id="my_application_tab" onclick="change_mind('my_application')" class="tab_top top_tag">
            议题详情
        </div>
        <div id="examine_tab" onclick="change_mind('examine')" class="tab_top">
            审批详情
        </div>
        <div id="new_issues_tab" onclick="change_mind('new_issues')" class="tab_top">
            附件
        </div>

        <div id="" style="width: 100px;float: right;text-align: center;margin-right: 1%;height: 40px;">
            <button id="" onmousemove="page_zhanshi()" onmouseout="page_yincang()"
                    style="width: 100px;height: 30px;line-height: 27px;border: #1E90FF solid 1px;background: #1E90FF;color: white;margin-top: 5px;border-radius: 3px;">
                操作
            </button>
        </div>

        <div id="dowload_but"
             style="width: 110px;float: right;text-align: center;margin-right: 6px;height: 40px;display: none;">
            <button id="download"
                    style="line-height: 27px;border-radius: 3px;border: #1E90FF solid 0.5px;width: 100px;height: 30px;margin-top: 5px;background: #1E90FF;color: white;">
                <ul class="nav navbar-nav navbar-right" style="height: 100%;position: relative;">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false" style="color: white;">
                        <span style="margin-left: 20px;">下载</span> <span class="caret"></span>
                    </a>
                    <li class="dropdown" style="width: 100%;height: 100%;">
                        <ul id="dowload_ul" class="dropdown-menu" style="width: 350px;margin-right: 100px;">
                            {% for main_file in data_dic.main_file_list %}
                                <li><a style='color: black;' href='/announcements/file_download?file_path=/media/{{ main_file.word_path }}'>{{ main_file.file_name }}</a></li>
                            {% endfor %}
                        </ul>
                    </li>
                </ul>
            </button>
        </div>

        <div id="page_one" onmousemove="page_zhanshi()" onmouseout="page_yincang()"
             style="z-index: 1000; position: absolute; width: 100px; height: auto;right: 0.9%; top: 80px;background: #FFFFFF; box-shadow: rgb(204 204 204) 2px 2px 10px;padding: 5px;display: none;">
            <button onclick="print_topics()" class="button_for_control">
                打印
            </button>
            {% if data_dic.is_audit == 'true' %}
                <button onclick="online_tag()" id="approver_but" class="button_for_control">
                    审批
                </button>
            {% endif %}

            {% if data_dic.is_stop == 'true' %}
                <button id="is_stop" onclick="operate_button(this.id)" class="button_for_control">
                    终止
                </button>
            {% endif %}
        </div>

        <div style="width: 110px;float: right;text-align: center;margin-right: 6px;height: 40px;">
            <button style="line-height: 27px;border-radius: 3px;border: #1E90FF solid 0.5px;width: 100px;height: 30px;margin-top: 5px;background: #1E90FF;color: white;" onclick="javascript:history.back(-1)">
                返回
            </button>
        </div>
    </div>

    <div id="appave-model" class="shade">
        <div id="examine-model" style="width: 700px;background: white;left: 50%;top: 50%;position: absolute;transform: translate(-50%, -50%);">
            <div id="appave-title" style="width: 100%;height: 40px;border-bottom: #cfcfcf solid 1px;font-size: 14px;cursor: move;">
                <div style="width: 40%;height: 40px;line-height: 40px;text-align: left;padding-left: 1%;letter-spacing: 2px;float: left;">
                    审批
                </div>
                <div style="width: 59%;height: 40px;letter-spacing: 2px;float: left;">
                    <div onclick="close_models()" style="width: 40px;height: 40px;text-align: center;line-height: 40px;cursor: pointer;float: right;">
                        <i class="iconfont icon-quchu"></i>
                    </div>
                </div>
            </div>

            <div style="width: 100%;font-size: 14px;background: #E8E8E8;padding-top: 1%;">
                <div style="width: 98%;height: 150px;margin-left: 1%;background: white;padding-top: 1%;padding-left: 1%;border-radius: 3px;padding-right: 1%;">
                    <div style="width: 100%;height: 35px;line-height: 35px;border-bottom: #E8E8E8 solid 1px;padding-left: 1%;">
                        基本信息
                    </div>
                    <div style="width: 100%;height: 125px;padding-left: 1%;">
                        <div style="width: 100%;height: 50px;">
                            <div style="width: 49%;height: 50px;float: left;padding-left: 1%;color: #B5B5B5;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;line-height: 50px;">
                                <span style="color: #9C9C9C;">议题名称：</span>{{ data_dic.topics_name }}
                            </div>
                            <div style="width: 49%;height: 50px;float: right;padding-left: 1%;color: #B5B5B5;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;line-height: 50px;">
                                <span style="color: #9C9C9C;">议题编号：</span>{{ obj.number }}
                            </div>
                        </div>

                        <div style="width: 100%;height: 50px;">
                            <div style="width: 49%;height: 50px;float: left;padding-left: 1%;color: #B5B5B5;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;line-height: 50px;">
                                <span style="color: #9C9C9C;">预算金额：</span>{% if data_dic.ysje %} {{ data_dic.ysje }}元 {% endif %}
                            </div>
                            <div style="width: 49%;height: 50px;float: right;padding-left: 1%;color: #B5B5B5;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;line-height: 50px;">
                                <span style="color: #9C9C9C;">经费来源：</span>{{ data_dic.jfly }}
                            </div>
                        </div>
                    </div>
                </div>

                <div style="width: 98%;margin-left: 1%;background: white;padding-top: 1%;padding-left: 1%;border-radius: 3px;margin-top: 1%;padding-right: 1%;padding-bottom: 20px;">
                    <div style="width: 100%;height: 35px;line-height: 35px;border-bottom: #E8E8E8 solid 1px;padding-left: 1%;">
                        意见
                    </div>
                    <div style="width: 100%;">
                        <textarea id="opinion_detail" placeholder="请输入审批意见" style="width: 96%;height: 100px;margin-left: 2%;margin-top: 1%;border: #cfcfcf solid 1px;outline: none;font-size: 14px;" ></textarea>
                    </div>
                </div>

                <div style="width: 100%;height: 40px;background: white;margin-top: 1%;text-align: right;padding-right: 2%;">
                    <button onclick="summit_data('audit')" style="letter-spacing: 3px;width: 100px;height: 30px;margin-top: 5px;border-radius: 1px;border: #00a0e9 solid 1px;text-align: center;background: #00a0e9;color: white;">同意</button>
                    <button onclick="summit_data('draft')" style="letter-spacing: 3px;width: 100px;height: 30px;margin-top: 5px;border-radius: 1px;border: #00a0e9 solid 1px;text-align: center;background: #00a0e9;color: white;margin-left: 15px;">退回修改</button>
                    <button onclick="ShelveTopic({{ obj.id }})" style="letter-spacing: 3px;width: 100px;height: 30px;margin-top: 5px;border-radius: 1px;border: #00a0e9 solid 1px;text-align: center;background: #00a0e9;color: white;">搁置</button>
                </div>
            </div>
        </div>
    </div>

    <div id="my_application" style="width: 100%;height: 95.3%;background-color: white;overflow: auto;">
        <div style="width: 100%;height: 93%;margin-top: 0.5px;" id="startprint">
            <div style="width: 100%;">
                <table style="width: 90%;margin-left: 5%;margin-top: 20px;">
                    <tr style="width: 100%;">
                        <td colspan="6" style="width: 100%;height: 40px;line-height: 40px;text-align: center;border: #CCCCCC solid 1px;"><h3 id="h_title">
                            {% if obj.type == 'yb' %}
                                院长办公会议题审批表
                            {% elif obj.type == 'db' %}
                                党委会议题审批表
                            {% else %}
                                行政例会议题审批表
                            {% endif %}
                        </h3></td>
                    </tr>
                    {% if obj.received_foreign %}
                        <tr style="width: 100%;margin-top: 20px;">
                            <td colspan="6" style="width: 100%;height: 40px;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">
                                上级来文详情
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                接收科室
                            </td>
                            <td style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;">{{ obj.received_foreign.apply_user.company.name }}</td>
                            <td style="width: 13%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                接收人
                            </td>
                            <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;">{{ obj.received_foreign.apply_user.real_name }}</td>
                            <td style="width: 12%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                收文编号
                            </td>
                            <td style="width: 20%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;outline: none;border-top: none;">{{ obj.received_foreign.recive_number }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                来文单位
                            </td>
                            <td colspan="5" style="width: 85%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.received_foreign.send_company }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                来文字号
                            </td>
                            <td colspan="5" style="width: 85%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.received_foreign.send_number }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                收文日期
                            </td>
                            <td colspan="5" style="width: 85%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">
                                {{ obj.received_foreign.recive_time | date:"Y-m-d H:i" }}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                标&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;题
                            </td>
                            <td colspan="5" style="width: 85%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.received_foreign.title }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                内&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;容
                            </td>
                            <td colspan="5" style="width: 85%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.received_foreign.content }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                标注文本
                            </td>
                            <td colspan="5" style="width: 85%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.received_foreign.annotated_text }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                时间期限
                            </td>
                            <td colspan="5" style="width: 85%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.received_foreign.time_limit }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注
                            </td>
                            <td colspan="5" style="width: 85%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.received_foreign.remarks }}</td>
                        </tr>
                    {% endif %}
                    <tr style="width: 100%;">
                        {% if obj.received_foreign %}
                            <td colspan="6" style="width: 90%;height: 40px;line-height: 40px;margin-left: 5%;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">议题申请详情</td>
                        {% else %}
                            <td colspan="6" style="width: 90%;height: 40px;line-height: 40px;margin-left: 5%;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">申请详情</td>
                        {% endif %}

                    </tr>
                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                            提&nbsp;&nbsp;交&nbsp;&nbsp;人
                        </td>
                        <td id="tjr" style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: left;padding-left: 1%;border-top: none;">{{ obj.employee.real_name }}</td>
                        <td style="width: 10%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                            提交科室
                        </td>
                        <td id="tjks"
                            style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: left;padding-left: 1%;border-top: none;">
                            {% if 'TW' in obj.number %}
                                团委
                            {% else %}
                                {{ obj.company.name }}
                            {% endif %}
                            </td>
                        <td style="width: 10%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                            议题编号
                        </td>
                        <td id="bh" style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: left;padding-left: 1%;border-top: none;">{{ obj.number }}</td>
                    </tr>
                    {% if obj.topic_type %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">议题类型</td>
                            <td {% if obj.topic_type == "4" or obj.topic_type == "5" or obj.topic_type == "6" %}colspan="5"{% elif obj.topic_type == "3" or obj.topic_type == "7" %}colspan="3"{% endif %} style="{% if obj.topic_type == "4" or obj.topic_type == "5" or obj.topic_type == "6" %}width: 85%{% elif obj.topic_type == "1" or obj.topic_type == "2" %}width: 25%{% elif obj.topic_type == "3" %}width: 53%{% else %}width: 25%{% endif %};height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: left;padding-left: 1%;border-top: none;">
                                {% if obj.topic_type == "1" %}
                                    付款类
                                {% elif obj.topic_type == "2" %}
                                    经济合同类
                                {% elif obj.topic_type == "3" %}
                                    项目类
                                {% elif obj.topic_type == "4" %}
                                    文件类
                                {% elif obj.topic_type == "5" %}
                                    方案类
                                {% elif obj.topic_type == "7" %}
                                    招标采购类
                                {% else %}
                                    其他事项
                                {% endif %}
                            </td>
                            {% if obj.topic_type == "1" or obj.topic_type == "2" %}
                                <td style="width: 10%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    {% if obj.topic_type == "1" %}
                                        付款类型
                                    {% else %}
                                        合同类型
                                    {% endif %}
                                </td>
                                <td id="pay_type_select" style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: left;padding-left: 1%;border-top: none;">
                                    {% if obj.topic_type == "1" %}
                                        {% if obj.pay_type == "1" %}
                                            合同付款
                                        {% elif obj.pay_type == "2" %}
                                            固定资产/维修维保付款
                                        {% elif obj.pay_type == "3" %}
                                            材料付款
                                        {% elif obj.pay_type == "4" %}
                                            餐补付款
                                        {% elif obj.pay_type == "5" %}
                                            学科经费
                                        {% elif obj.pay_type == "6" %}
                                            科研经费
                                        {% elif obj.pay_type == "8" %}
                                            工会经费
                                        {% else %}
                                            一般付款
                                        {% endif %}
                                    {% else %}
                                        {% if obj.contract_type == "1" %}
                                            服务类
                                        {% elif obj.contract_type == "2" %}
                                            货物类
                                        {% elif obj.contract_type == "3" %}
                                            工程类
                                        {% else %}
                                            其他类
                                        {% endif %}
                                    {% endif %}
                                </td>
                                <td style="width: 10%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">是否转党委会</td>
                                <td style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: left;padding-left: 1%;border-top: none;">
                                    {% if obj.whether_outweigh == "1" %}
                                        是
                                    {% else %}
                                        否
                                    {% endif %}
                                </td>
                            {% elif obj.topic_type == "3" %}
                                <td id="WhetherBidTitle" style="width: 12%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;">是否招标</td>
                                <td id="WhetherBid" style="width: 20%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;">
                                    {% if obj.whether_bid == "1" %}
                                        是
                                    {% else %}
                                        否
                                    {% endif %}
                                </td>
                            {% endif %}

                            {% if obj.topic_type == "7" %}
                                <td style="width: 10%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">是否转党委会</td>
                                <td style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: left;padding-left: 1%;border-top: none;">
                                    {% if obj.whether_outweigh == "1" %}
                                        是
                                    {% else %}
                                        否
                                    {% endif %}
                                </td>
                            {% endif %}
                        </tr>
                        {% if obj.topic_type == "1" %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">收款单位</td>
                                <td id="Payee" style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.Payee }}</td>
                                <td style="width: 13%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">收款账号</td>
                                <td id="receiving_account" style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.receiving_account }}</td>
                                <td style="width: 12%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;">开户行</td>
                                <td id="opening_bank" style="width: 20%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;outline: none;">{{ obj.opening_bank }}</td>
                            </tr>
                        {% elif obj.topic_type == "2" %}
                            <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">对方单位</td>
                                <td id="opposite_unit" style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.Payee }}</td>
                                <td style="width: 13%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">合同名称</td>
                                <td id="contract_name" style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ obj.contract_name }}</td>
                                <td style="width: 12%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;">合同编号</td>
                                <td id="contract_number" style="width: 20%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;outline: none;">{{ obj.contract_number }}</td>
                        {% endif %}

                        {% if obj.topic_type == "1" %}
                            <tr id="payment_capitalization" style="width: 100%;">
                            <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;">申请金额</td>
                            <td id="application_amount" style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;outline: none;">{{ obj.application_amount }}</td>
                            <td style="width: 13%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;">金额大写</td>
                            <td id="amount_words" style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;">{{ obj.amount_words }}</td>
                            <td style="width: 12%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;">经费来源</td>
                            <td style="width: 20%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;">
                                {% if obj.funding_source == "1" %}
                                    自有经费
                                {% elif obj.funding_source == "2" %}
                                    学科经费
                                {% elif obj.funding_source == "3" %}
                                    科研经费
                                {% elif obj.funding_source == "4" %}
                                    财政拨款
                                {% elif obj.funding_source == "5" %}
                                    贴息贷款
                                {% elif obj.funding_source == "6" %}
                                    专项债券
                                {% elif obj.funding_source == "7" %}
                                    工会经费
                                {% else %}

                                {% endif %}
                            </td>
                        </tr>
                        {% endif %}
                    {% else %}
                    {% endif %}

                    <tr id="xb_ks" style="width: 100%;{% if obj.type == 'xz' %} display: none; {% endif %}">
                        <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                            协办科室
                        </td>
                        <td id="xieban" {% if obj.topic_type == "1" %}colspan="5"{% endif %} style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;">{{ data_dic.help_department }}</td>
                        <td style="width: 10%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;{% if obj.topic_type == "1" %}display: none;{% endif %}">
                            预算金额(不超过)
                        </td>
                        <td id="ysje" style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: left;padding-left: 1%;border-top: none;{% if obj.topic_type == "1" %}display: none;{% endif %}">{{ data_dic.ysje }}</td>
                        <td style="width: 10%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;{% if obj.topic_type == "1" %}display: none;{% endif %}">
                            经费来源
                        </td>
                        <td id="jfly" style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: left;padding-left: 1%;border-top: none;{% if obj.topic_type == "1" %}display: none;{% endif %}">{{ data_dic.jfly }}</td>
                    </tr>
                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                            议题名称
                        </td>
                        <td id="ytmc" colspan="3" style="width: 50%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ data_dic.topics_name }}</td>
                        <td style="width: 10%;height: 40px;line-height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                            预估用时(分钟)
                        </td>
                        <td id="ygys" style="width: 25%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ data_dic.topics_estimate }}</td>
                    </tr>
                    {% if data_dic.yb_number %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 40px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                                院长办公会<br>议&nbsp;题&nbsp;编&nbsp;号
                            </td>
                            <td id="yb_number" colspan="5" style="width: 85%;height: 40px;line-height: 40px;border: #cccccc solid 1px;border-left: none;padding-left: 1%;border-top: none;outline: none;">{{ data_dic.yb_number }}</td>
                        </tr>
                    {% endif %}
                    {% if 'PG' in data_dic.audit_list and obj.state != 'PG' and data_dic.db_topics_text or data_dic.db_topics_basis or data_dic.db_solution %}
                        <tr style="width: 100%;">
                            <td colspan="6" style="width: 90%;height: 40px;line-height: 40px;margin-left: 5%;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">院长办公会议题内容</td>
                        </tr>
                    {% endif %}

                    <tr style="width: 100%;">
                        <td style="width: 15%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                            议题简述
                        </td>
                        <td id="ytnr" colspan="5" style="width: 85%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;padding-left: 1%;">
                        </td>
                    </tr>
                    <tr id="yt_yj" style="width: 100%;{% if obj.type == 'xz' %} display: none; {% endif %}">
                        <td style="width: 15%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                            政策依据<br>或调研论<p style="letter-spacing: 1px;">证&nbsp;&nbsp;情&nbsp;&nbsp;况</p>
                        </td>
                        <td id="ytyj" colspan="5"
                            style="width: 85%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;padding-left: 1%;"></td>
                    </tr>
                    <tr id="jj_fa" style="width: 100%;{% if obj.type == 'xz' %} display: none; {% endif %}">
                        <td style="width: 15%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                            拟供选择
                            <p style="letter-spacing: 3px;">方&nbsp;&nbsp;&nbsp;&nbsp;案</p>
                        </td>
                        <td id="jjfa" colspan="5"
                            style="width: 85%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;padding-left: 1%;"></td>
                    </tr>
                    {% if obj.received_foreign %}
                        <tr style="width: 100%;">
                            <td colspan="6" style="width: 100%;height: 40px;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">
                                上级来文审批详情
                            </td>
                        </tr>
                        {% if 'one' in received_audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 0.7%;border-top: none;letter-spacing: 4px;">
                                    {% if company_type == 'yb' %}
                                        医院办公室
                                    {% else %}
                                        党委办公室
                                    {% endif %}
                                </td>
                                <td colspan="5" style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                    {% for k,v in received_audit_dic.items %}
                                        {% if k == 'one' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt=""
                                                                 style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'two' in received_audit_dic %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 1px;">
                                    分&nbsp;&nbsp;管&nbsp;&nbsp;领&nbsp;&nbsp;导
                                </td>
                                <td colspan="5" style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                    {% for k,v in received_audit_dic.items %}
                                        {% if k == 'two' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        {% if item.state_display != 'end' %}
                                                            <span>{{ item.state_display }}</span>
                                                        {% else %}
                                                            <span>完结</span>
                                                        {% endif %}
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt=""
                                                                 style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}
                    {% endif %}

                    {% if 'PG' in data_dic.audit_list and obj.state != 'PG' or obj.HouseToParty_id %}
                        <tr>
                            <td colspan="6" style="width: 90%;height: 40px;line-height: 40px;margin-left: 5%;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">
                                院长办公会审批详情
                            </td>
                        </tr>
                    {% else %}
                        <tr>
                            <td colspan="6" style="width: 90%;height: 40px;line-height: 40px;margin-left: 5%;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">
                                审批详情
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'B' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;管&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;领&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;导
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'B' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'OPR' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                医&nbsp;院&nbsp;办&nbsp;公&nbsp;室&nbsp;初&nbsp;审
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'OPR' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    {{ item.state_display }}
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if obj.type == 'xz' %}
                        {% if 'YZ/SJ' in data_dic.audit_list %}
                            <tr style="width: 100%;" >
                                <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    {% if obj.type == 'db' %}
                                        {% if obj.is_yb %}
                                            院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;长&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;意&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;见
                                        {% else %}
                                            书&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;记&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;意&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;见
                                        {% endif %}
                                    {% else %}
                                        院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;长&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;意&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;见
                                    {% endif %}
                                </td>
                                <td id="" colspan="5"
                                    style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                    {% for k,v in data_dic.audit_list.items %}
                                        {% if k == 'YZ/SJ' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt=""
                                                             style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'YB/DB' in data_dic.audit_list %}
                            <tr style="width: 100%;" >
                                <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    医&nbsp;&nbsp;&nbsp;院&nbsp;&nbsp;&nbsp;办&nbsp;&nbsp;&nbsp;公&nbsp;&nbsp;&nbsp;室
                                </td>
                                <td id="" colspan="5"
                                    style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                    {% for k,v in data_dic.audit_list.items %}
                                        {% if k == 'YB/DB' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        {{ item.state_display }}
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt=""
                                                             style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}
                    {% else %}
                        {% if 'YB/DB' in data_dic.audit_list %}
                            <tr style="width: 100%;" >
                                <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    {% if 'yb_result' in data_dic.audit_list or obj.type == 'yb' %}
                                        医&nbsp;院&nbsp;办&nbsp;公&nbsp;室&nbsp;核&nbsp;稿
                                    {% else %}
                                        党&nbsp;&nbsp;&nbsp;委&nbsp;&nbsp;&nbsp;办&nbsp;&nbsp;&nbsp;公&nbsp;&nbsp;&nbsp;室
                                    {% endif %}
                                </td>
                                <td id="" colspan="5"
                                    style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                    {% for k,v in data_dic.audit_list.items %}
                                        {% if k == 'YB/DB' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        {% if item.state_display == '同意' %}
                                                            已审核
                                                        {% else %}
                                                            <span>{{ item.state_display }}</span>
                                                        {% endif %}
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt=""
                                                             style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'Y_D_leader' in data_dic.audit_list %}
                            <tr style="width: 100%;" >
                                <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    党委办公室分管领导
                                </td>
                                <td id="" colspan="5"
                                    style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                    {% for k,v in data_dic.audit_list.items %}
                                        {% if k == 'Y_D_leader' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt=""
                                                             style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}

                        {% if 'YZ/SJ' in data_dic.audit_list %}
                            <tr style="width: 100%;" >
                                <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    {% if obj.type == 'db' %}
                                        {% if obj.is_yb %}
                                            院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;长&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;意&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;见
                                        {% else %}
                                            书&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;记&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;意&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;见
                                        {% endif %}
                                    {% else %}
                                        院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;长&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;意&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;见
                                    {% endif %}
                                </td>
                                <td id="" colspan="5"
                                    style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                    {% for k,v in data_dic.audit_list.items %}
                                        {% if k == 'YZ/SJ' %}
                                            {% for item in v %}
                                                {% if item.state != 'unaudit' %}
                                                    <div style="width: 100%;line-height: 20px;position: relative;">
                                                        <span>{{ item.state_display }}</span>
                                                        <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                    </div>
                                                    <div>
                                                        {% if item.signature_picture %}
                                                            <img src="{{ item.signature_picture }}" alt=""
                                                             style="width: 150px; height: 60px;">
                                                        {% else %}
                                                            {{ item.audit_user }}
                                                        {% endif %}
                                                    </div>
                                                    <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                                {% endif %}
                                            {% endfor %}
                                        {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endif %}
                    {% endif %}

                    {% if 'yb_result' in data_dic.audit_list %}
                        {% if vote_obj %}
                            <tr style="width: 100%;" >
                                <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    院&nbsp;&nbsp;&nbsp;长&nbsp;&nbsp;&nbsp;办&nbsp;&nbsp;&nbsp;公&nbsp;&nbsp;&nbsp;会
                                </td>
                                <td colspan="5" style="width: 85%;height: 75px;border: #cccccc solid 1px;border-top: none;outline: none;padding-left: 0.5%;">
                                    <div style="width: 100%;height: 80px;position: relative;">
                                        <span>{{ vote_obj.create_time|date:'Y年m月d日' }} 第 {{ vote_obj.meet_number }} 次院长办公会</span>
                                    </div>
                                    <div style="text-align: right;color: #0b0b0b;">{{ vote_obj.create_time|date:'Y-m-d H:i' }}</div>
                                </td>
                            </tr>
                        {% endif %}

                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                院长办公会会议结果
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'yb_result' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'marks' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                议&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;题&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'marks' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'transfer' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                提&nbsp;&nbsp;&nbsp;交&nbsp;&nbsp;&nbsp;党&nbsp;&nbsp;&nbsp;委&nbsp;&nbsp;&nbsp;会
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'transfer' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'db_leader' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;管&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;领&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;导
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'db_leader' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'PG' in data_dic.audit_list and obj.state != 'PG' and data_dic.db_topics_text or data_dic.db_topics_basis or data_dic.db_solution %}
                        <tr style="width: 100%;">
                            <td colspan="6" style="width: 90%;height: 40px;line-height: 40px;margin-left: 5%;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">党委会议题内容</td>
                        </tr>

                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                                议题简述
                            </td>
                            <td id="dw_ytnr" colspan="5" style="width: 85%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;padding-left: 1%;">
                            </td>
                        </tr>
                        <tr id="yt_yj" style="width: 100%;{% if obj.type == 'xz' %} display: none; {% endif %}">
                            <td style="width: 15%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 2px;">
                                政策依据或调研论证情况
                            </td>
                            <td id="dw_ytyj" colspan="5"
                                style="width: 85%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;padding-left: 1%;"></td>
                        </tr>
                        <tr id="jj_fa" style="width: 100%;{% if obj.type == 'xz' %} display: none; {% endif %}">
                            <td style="width: 15%;height: 100px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                拟供选择方案
                            </td>
                            <td id="dw_jjfa" colspan="5"
                                style="width: 85%;height: 100px;border: #cccccc solid 1px;border-left: none;border-top: none;padding-left: 1%;"></td>
                        </tr>
                    {% endif %}

                    {% if 'PG' in data_dic.audit_list and obj.state != 'PG' or obj.HouseToParty_id %}
                        <tr>
                            <td colspan="6" style="width: 90%;height: 40px;line-height: 40px;margin-left: 5%;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;padding-right: 1%;">
                                党委会审批详情
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'PG' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                党&nbsp;&nbsp;&nbsp;委&nbsp;&nbsp;&nbsp;办&nbsp;&nbsp;&nbsp;公&nbsp;&nbsp;&nbsp;室
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'PG' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    {% if item.state_display == '同意' %}
                                                        已审核
                                                    {% else %}
                                                        <span>{{ item.state_display }}</span>
                                                    {% endif %}
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'db_one_step' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;管&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;领&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;导
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'db_one_step' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'db_two_step' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                党&nbsp;&nbsp;&nbsp;委&nbsp;&nbsp;&nbsp;办&nbsp;&nbsp;&nbsp;公&nbsp;&nbsp;&nbsp;室
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'db_two_step' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    {% if item.state_display == '同意' %}
                                                        已审核
                                                    {% else %}
                                                        <span>{{ item.state_display }}</span>
                                                    {% endif %}
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'db_three_step' in data_dic.audit_list %}
                    <tr style="width: 100%;" >
                        <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                            党委办公室分管领导
                        </td>
                        <td id="" colspan="5"
                            style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                            {% for k,v in data_dic.audit_list.items %}
                                {% if k == 'db_three_step' %}
                                    {% for item in v %}
                                        {% if item.state != 'unaudit' %}
                                            <div style="width: 100%;line-height: 20px;position: relative;">
                                                <span>{{ item.state_display }}</span>
                                                <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                            </div>
                                            <div>
                                                {% if item.signature_picture %}
                                                    <img src="{{ item.signature_picture }}" alt=""
                                                     style="width: 150px; height: 60px;">
                                                {% else %}
                                                    {{ item.audit_user }}
                                                {% endif %}
                                            </div>
                                            <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                        {% endif %}
                                    {% endfor %}
                                {% endif %}
                            {% endfor %}
                        </td>
                    </tr>
                {% endif %}

                    {% if 'sj' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                书&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;记&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;意&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;见
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'sj' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'db_result' in data_dic.audit_list %}
                        {% if db_vote_obj %}
                            <tr style="width: 100%;" >
                                <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                    党&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;委&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;会
                                </td>
                                <td colspan="5" style="width: 85%;height: 75px;border: #cccccc solid 1px;border-top: none;outline: none;padding-left: 0.5%;">
                                    <div style="width: 100%;height: 80px;position: relative;">
                                        <span>{{ db_vote_obj.create_time|date:'Y年m月d日' }} 第 {{ db_vote_obj.meet_number }} 次党委会</span>
                                    </div>
                                    <div style="text-align: right;color: #0b0b0b;">{{ db_vote_obj.create_time|date:'Y-m-d H:i' }}</div>
                                </td>
                            </tr>
                        {% endif %}

                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                党&nbsp;委&nbsp;会&nbsp;会&nbsp;议&nbsp;结&nbsp;果
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'db_result' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'xz_result' in data_dic.audit_list %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                行政例会会议结果
                            </td>
                            <td id="" colspan="5"
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in data_dic.audit_list.items %}
                                    {% if k == 'xz_result' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt=""
                                                         style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}
                </table>
            </div>
            <div id="fujian_div" style="width: 90%;margin-left: 5%; display: none">
                <div style="width: 100%;height: 40px;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;border-top: none;border-bottom: none;padding-right: 1%;">
                    <span style="color: red;">* </span>附件
                    <a href="javascript:;" class="file" style="vertical-align: top;margin-top: 5px;float: right;">
                        上传附件
                        <input type="file" name="regular_main_body" id="regular_main_body"
                               onchange="upload_accessory('file1', 'regular_main', 'regular_main_body')">
                    </a>
                </div>
                <table style="width: 100%;">
                    <thead>
                    <tr>
                        <td style="width: 5%;border: #cccccc solid 1px;text-align: center;">序号</td>
                        <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">文件名称</td>
                        <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">文件大小</td>
                        <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">上传时间</td>
                        <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">上传人员</td>
                        <td style="width: 15%;border: #cccccc solid 1px;border-left: none;text-align: center;">操作</td>
                    </tr>
                    </thead>
                    <tbody style="overflow: auto;" id="regular_main">

                    </tbody>
                </table>
            </div>
        </div><!--endprint-->
    </div>

    <div id="new_issues" style="width: 100%;height: 94%;overflow: auto;display: none;background-color: white;">
        <div style="display: inline-block;width: 20%;vertical-align: top;height: 99%">
            {% if received_file_list|length %}
                <div style="width: 100%;height: 40px;background: #c8cbcf;padding-left: 2%;line-height: 40px;color: #0c6fd9;">
                    上级来文附件
                </div>
                <div style="width: 100%;">
                    {% for received in received_file_list %}
                        <div><a href="javascript:;" class="a_tag_cla" onclick="chage_yulan(this, '{{ received.file_path }}')">{{ received.file_name }}</a></div>
                    {% endfor %}
                </div>
            {% endif %}
            <div style="width: 100%;height: 40px;background: #c8cbcf;padding-left: 2%;line-height: 40px;color: #0c6fd9;">
                {% if received_file_list|length %}
                    议题附件
                {% else %}
                    附件
                {% endif %}
            </div>
            <div style="width: 100%;">
                {% for item in data_dic.main_file_list %}
                    <div><a href="javascript:;" class="a_tag_cla" onclick="chage_yulan(this, '{{ item.file_path }}')">{{ item.file_name }}</a></div>
                {% endfor %}
            </div>
        </div>
        <div style="display: inline-block;width: 78%;vertical-align: top;height: 99%;text-align: center;" id="fujian">
            {% if 'jpg' in data_dic.file_path or 'JPG' in data_dic.file_path or 'JPEG' in data_dic.file_path or 'jpeg' in data_dic.file_path or 'PNG' in data_dic.file_path or 'png' in data_dic.file_path %}
                <img src="{{ data_dic.file_path }}" alt="" style="width: 800px;height: 100%;">
            {% else %}
                <embed id="embed_file" src="{{ data_dic.file_path }}" type="application/pdf" style="width: 100%;height: 100%;">
            {% endif %}
        </div>
    </div>

    <div id="examine" style="width: 100%;height: 94%;overflow: auto;display: none;background-color: white;">
        <div class="right-box" style="width: 100%;height: 100%;margin-top: 0;">
            <div style="height: 100%;width: 100%;overflow: auto;background-color: white;">
                <table class="table table-hover table-bordered"
                       style="border-collapse: collapse;width: 100%;table-layout:fixed;">
                    <thead>
                    <tr>
                        <th>审批人</th>
                        <th>审批状态</th>
                        <th>审批时间</th>
                        <th>审批意见</th>
                        <th>签名</th>
                    </tr>
                    </thead>
                    <tbody style="overflow: auto;" id="my_mine_body">
                        {% for k,v in data_dic.audit_list.items %}
                            {% for foo in v %}
                                <tr>
                                    <td style="text-align: center;">{{ foo.audit_user }}</td>
                                    <td style="text-align: center;">{{ foo.state_display }}</td>
                                    <td style="text-align: center;">{{ foo.audit_time }}</td>
                                    <td>{{ foo.audit_note }}</td>
                                    <td style="text-align: center;">
                                        {% if foo.state_display != '待审核' %}
                                            <img src="{{ foo.signature_picture }}" alt="" style="width: 100px;height: 40px;">
                                        {% endif %}
                                    </td>
                                </tr>
                            {% endfor %}
                        {% endfor %}
                    </tbody>
                </table>
                <div id="img-display" style="width: 75%;text-align: center;position: fixed;display: none;">
                    <div style="margin-top: 10%;">
                        <img src="../../static/public_file/images/page-img/11.jpg" alt="">
                        <p style="margin: 0;padding: 0;vertical-align: top;">暂无数据</p>
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}

{% block script %}
    <script language="javascript" src="../../static/personal_center/js/jquery-1.4.4.min.js"></script>
    <script language="javascript" src="../../static/personal_center/js/jquery.jqprint-0.3.js"></script>
    <script>
        window.onload = function () {
            document.getElementById("loading").style.display = "none";
            document.getElementById("personage").className = "add_class";
            document.getElementById("sponsor").className = "add-nav-active";

            var decode = atob('{{ data_dic.topics_text | safe }}');
            // 编码转字符串
            var content = decodeURI(decode);

            var decode1 = atob('{{ data_dic.topics_basis | safe }}');
            // 编码转字符串
            var content1 = decodeURI(decode1);
            if ('{{ data_dic.solution | safe }}' !== "空") {
                var decode2 = atob('{{ data_dic.solution | safe }}');
                var content2 = decodeURI(decode2);      // 编码转字符串
            }

            document.getElementById("ytnr").innerHTML = content;
            document.getElementById("ytyj").innerHTML = content1;
            document.getElementById("jjfa").innerHTML = content2;

            {% if 'PG' in data_dic.audit_list and obj.state != 'PG' and data_dic.db_topics_text or data_dic.db_topics_basis or data_dic.db_solution %}
                var decode_1 = atob('{{ data_dic.db_topics_text | safe }}');
                // 编码转字符串
                var content_1 = decodeURI(decode_1);

                var decode1_1 = atob('{{ data_dic.db_topics_basis | safe }}');
                // 编码转字符串
                var content1_1 = decodeURI(decode1_1);
                if ('{{ data_dic.db_solution | safe }}' !== "空") {
                    var decode2_1 = atob('{{ data_dic.db_solution | safe }}');
                    var content2_1 = decodeURI(decode2_1);      // 编码转字符串
                }
                document.getElementById("dw_ytnr").innerHTML = content_1;
                document.getElementById("dw_ytyj").innerHTML = content1_1;
                document.getElementById("dw_jjfa").innerHTML = content2_1;
            {% endif %}
        };

        let appave_title = document.querySelector("#appave-title");
        let examine_model = document.querySelector("#examine-model");

        appave_title.addEventListener("mousedown", function (e) {
            let x = e.pageX - examine_model.offsetLeft;
            let y = e.pageY - examine_model.offsetTop;
            document.addEventListener("mousemove", move);

            function move(e) {
                examine_model.style.left = e.pageX - x + 'px';
                examine_model.style.top = e.pageY - y + 'px';
            }

            document.addEventListener("mouseup", function (e) {
                document.removeEventListener("mousemove", move);
            })
        });

        function chage_yulan(this_, file_path) {
            var fujian = document.getElementById("fujian");
            var file_index = file_path.lastIndexOf(".")
            var ext = file_path.substring(file_index+1)
            var arr=['jpg', 'JPG', "JPEG", "jpeg", "PNG", "png"];
            var ext_index=arr.indexOf(ext);
            if (ext_index === -1){
                fujian.innerHTML = '<embed id="embed_file" src="'+file_path+'" type="" style="width: 100%;height: 100%;">'
            }else {
                fujian.innerHTML = '<img src="' + file_path + '" alt="application/pdf" style="width: 800px;height: 100%;">'
            }

            var a_tag_list = document.getElementsByClassName("a_tag_cla");
            for (var i = 0;i<a_tag_list.length; i++){
                a_tag_list[i].style.background='';
            }
            this_.style.background='#cfcfcf';
        }

        function change_mind(ele_id) {
            if (ele_id === "my_application") {
                document.getElementById("my_application").style.display = "inline-block";
                document.getElementById("new_issues").style.display = "none";
                document.getElementById("my_application_tab").className = "tab_top top_tag";
                document.getElementById("new_issues_tab").className = "tab_top";
                document.getElementById("examine").style.display = "none";
                document.getElementById("examine_tab").className = "tab_top";
                document.getElementById("dowload_but").style.display = "none";
            } else if (ele_id === "new_issues") {
                document.getElementById("new_issues").style.display = "inline-block";
                document.getElementById("my_application").style.display = "none";
                document.getElementById("my_application_tab").className = "tab_top";
                document.getElementById("new_issues_tab").className = "tab_top top_tag";
                document.getElementById("examine").style.display = "none";
                document.getElementById("examine_tab").className = "tab_top";
                document.getElementById("dowload_but").style.display = "inline-block";
                {#document.getElementById("print_but").style.display = "none";#}
            } else {
                document.getElementById("examine").style.display = "inline-block";
                document.getElementById("examine_tab").className = "tab_top top_tag";
                document.getElementById("new_issues").style.display = "none";
                document.getElementById("my_application").style.display = "none";
                document.getElementById("my_application_tab").className = "tab_top";
                document.getElementById("new_issues_tab").className = "tab_top";
                document.getElementById("dowload_but").style.display = "none";
                {#document.getElementById("print_but").style.display = "none";#}
            }
        }

        function online_tag() {
            document.getElementById("appave-model").style.display = "table-cell";
        }

        function close_models() {
            document.getElementById("appave-model").style.display = "none";
        }

        function summit_data(approve) {
            var topic_type = "{{ obj.type | safe }}";
            var present_id = window.location.href.split("id=")[1].replace("#", '');
            var audit_note = document.getElementById("opinion_detail").value;

            if (approve === "draft") {
                if (!audit_note) {
                    alert("不同意请填写理由！");
                    return false
                }
            }
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/administrative/TopicsDetailView");
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
            xhr.send("id=" + present_id + "&state=" + String(approve) + "&audit_note=" + String(audit_note));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate["code"] === 200) {
                            alert("审批成功");
                            if (topic_type === "yb") {
                                window.location.href = "/personal-center/process_management.html?type=我的待办&folw_type=议题管理&folw=院长办公会议题&page=1&page_size=20&wd=";
                            }else if (topic_type === "db") {
                                window.location.href = "/personal-center/process_management.html?type=我的待办&folw_type=议题管理&folw=党委会议题&page=1&page_size=20&wd=";
                            }else {
                                window.location.href = "/personal-center/process_management.html?type=我的待办&folw_type=议题管理&folw=行政例会议题&page=1&page_size=20&wd=";
                            }
                        } else {
                            alert(JsonDate["message"]);
                        }
                    }
                }
            };
        }

        function print_topics() {
            $('#startprint').jqprint({
                debug: false,
                importCSS: true,
                printContainer: true,
                operaSupport: false
            });
        }

        function but_click(iss_type) {
            document.getElementById("loading").style.display = "inline-block";
            var present_id = window.location.href.split("id=")[1].replace("#", '');
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/personal-center/dayin_pdf");
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
            xhr.send("iss_type=" + String(iss_type) + "&id=" + String(present_id));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        window.open(JsonDate['data'][0]['file_path']);
                    }
                }
            };
        }

        // 上传正文
        function upload_accessory(file_type, tbody_id, accessory_type, bh_id) {
            document.getElementById("loading").style.display = "inline-block";
            var bill_id = window.location.href.split('id=')[1].replace("#", '')
            var form = new FormData();
            var files = document.getElementById(accessory_type).files[0];
            form.append(file_type, files);
            form.append('number', uuid);
            form.append('source', "yt");
            form.append('bill_id', bill_id);

            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/administrative/topics_attachments_upload", true);
            xhr.send(form);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        if (JsonDate["code"] === 400) {
                            alert("请上传xlsx格式文件！")
                        }
                        creat_table(JsonDate, tbody_id)
                    }
                }
            };
        }

        function creat_table(JsonData) {
            var t_table = document.getElementById("regular_main");
            var local_host = window.location.host;
            if (Array.isArray(JsonData["pdf_path"])) {
                for (var i = 0; i < JsonData["pdf_path"].length; i++) {
                    var tr = document.createElement("tr");
                    var td1 = document.createElement("td");
                    var td2 = document.createElement("td");
                    var td3 = document.createElement("td");
                    var td4 = document.createElement("td");
                    var td5 = document.createElement("td");
                    var td6 = document.createElement("td");
                    td1.innerHTML = t_table.children.length + 1;
                    td1.style.textAlign = "center";
                    td1.style.border = "#cccccc solid 1px";
                    td1.style.borderTop = "none";
                    td2.innerHTML = JsonData["file_name"];
                    td2.style.paddingLeft = "1%";
                    td2.style.border = "#cccccc solid 1px";
                    td2.style.borderLeft = "none";
                    td2.style.borderTop = "none";
                    td3.innerHTML = JsonData["file_size"];
                    td3.style.textAlign = "center";
                    td3.style.border = "#cccccc solid 1px";
                    td3.style.borderLeft = "none";
                    td3.style.borderTop = "none";
                    td4.innerHTML = JsonData["upload_time"];
                    td4.style.textAlign = "center";
                    td4.style.border = "#cccccc solid 1px";
                    td4.style.borderLeft = "none";
                    td4.style.borderTop = "none";
                    td5.innerHTML = JsonData["uploader"];
                    td5.style.textAlign = "center";
                    td5.style.border = "#cccccc solid 1px";
                    td5.style.borderLeft = "none";
                    td5.style.borderTop = "none";
                    td6.innerHTML = "<a target='_blank' href='" + JsonData["pdf_path"][i]["pdf_path"] + "'>查看</a> | <a style='color: red;' href='#' onclick='RemoveTr(this, \"" + tbody_id + "\", \"" + JsonData["pdf_path"][i]["id"] + "\")'>删除</a>";
                    td6.style.textAlign = "center";
                    td6.style.border = "#cccccc solid 1px";
                    td6.style.borderLeft = "none";
                    td6.style.borderTop = "none";
                    tr.appendChild(td1);
                    tr.appendChild(td2);
                    tr.appendChild(td3);
                    tr.appendChild(td4);
                    tr.appendChild(td5);
                    tr.appendChild(td6);
                    t_table.appendChild(tr);
                }
                if (JsonData["pdf_path"].length > 1) {
                    document.getElementById("del_adjunct").style.display = 'block';
                }
            } else {
                var tr = document.createElement("tr");
                var td1 = document.createElement("td");
                var td2 = document.createElement("td");
                var td3 = document.createElement("td");
                var td4 = document.createElement("td");
                var td5 = document.createElement("td");
                var td6 = document.createElement("td");
                td1.innerHTML = t_table.children.length + 1;
                td1.style.textAlign = "center";
                td1.style.border = "#cccccc solid 1px";
                td1.style.borderTop = "none";
                td2.innerHTML = JsonData["file_name"];
                td2.style.paddingLeft = "1%";
                td2.style.border = "#cccccc solid 1px";
                td2.style.borderLeft = "none";
                td2.style.borderTop = "none";
                td3.innerHTML = JsonData["file_size"];
                td3.style.textAlign = "center";
                td3.style.border = "#cccccc solid 1px";
                td3.style.borderLeft = "none";
                td3.style.borderTop = "none";
                td4.innerHTML = JsonData["upload_time"];
                td4.style.textAlign = "center";
                td4.style.border = "#cccccc solid 1px";
                td4.style.borderLeft = "none";
                td4.style.borderTop = "none";
                td5.innerHTML = JsonData["uploader"];
                td5.style.textAlign = "center";
                td5.style.border = "#cccccc solid 1px";
                td5.style.borderLeft = "none";
                td5.style.borderTop = "none";
                td6.innerHTML = "<a target='_blank' href='" + JsonData["pdf_path"] + "'>查看</a> | <a style='color: red;' href='#' onclick='RemoveTr(this, \"regular_main\", \"" + JsonData["id"] + "\")'>删除</a>";
                td6.style.textAlign = "center";
                td6.style.border = "#cccccc solid 1px";
                td6.style.borderLeft = "none";
                td6.style.borderTop = "none";
                tr.appendChild(td1);
                tr.appendChild(td2);
                tr.appendChild(td3);
                tr.appendChild(td4);
                tr.appendChild(td5);
                tr.appendChild(td6);
                t_table.appendChild(tr);
            }
        }

        function RemoveTr(_this, tbody_id, wj_id) {
            var table = document.getElementById(tbody_id);
            var trNode = $(_this).parent().parent();
            trNode.remove();

            for (var i = 0; i < table.children.length; i++) {
                table.children[i].children[0].innerHTML = i + 1;
            }

            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/administrative/delete_attachments_view", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("id=" + String(wj_id));
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        alert("删除成功！")
                    }
                }
            };
        }

        function page_zhanshi() {
            document.getElementById('page_one').style.display = 'inline-block';
        }

        function page_yincang() {
            document.getElementById('page_one').style.display = 'none';
        }

        function operate_button(ele_id) {
            var url = window.location.href;
            var id = url.split("id=")[1];
            console.log(ele_id)
            if (ele_id === 'is_stop') {
                var state = 'stop';     // 终止
                var word = '终止'
            }
            var r = confirm('是否' + word + '流程？')
            if (r === true) {
                var xhr = new XMLHttpRequest();
                var local_host = window.location.host;          // 获取当前IP
                xhr.open('post', "/administrative/topics_apply_cancel_view", true);
                xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
                xhr.send("state=" + state + "&id=" + id)
                xhr.onreadystatechange = function () {
                    if (xhr.readyState === 4) {
                        if (xhr.status === 200) {
                            document.getElementById("loading").style.display = "none";
                            var JsonDate = JSON.parse(xhr.responseText);
                            console.log(JsonDate);
                            alert(JsonDate['message'])
                            window.location.href = '/personal-center/topics_list_view'
                        }
                    }
                };
            }
        }

        function TransferReturn(types) {
            if (types === '1') {
                var r = confirm('确认退回该议题！')
            }else {
                r = confirm('确认将该议题转会！')
            }
            if (r) {
                var xhr = new XMLHttpRequest();
                var local_host = window.location.host;          // 获取当前IP
                xhr.open('post', "/administrative/TransferOperations", true);
                xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
                xhr.send("types=" + types+"&id={{ id | safe }}")
                xhr.onreadystatechange = function () {
                    if (xhr.readyState === 4) {
                        if (xhr.status === 200) {
                            document.getElementById("loading").style.display = "none";
                            var JsonDate = JSON.parse(xhr.responseText);
                            console.log(JsonDate);
                            alert(JsonDate['message'])
                            window.location.href = '/personal-center/process_management.html?type=我的待办&folw_type=&folw=&page=1&page_size=20&wd='
                        }
                    }
                };
            }
        }

        function ShelveTopic(flow_id) {
            var remarks = document.getElementById("opinion_detail").value;
            if (!remarks) {
                alert("请填写搁置理由！");
                return false
            }
            var xhr = new XMLHttpRequest();
            xhr.open('post', "/personal-center/IssueRemarks", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("iss_id="+String(flow_id)+"&shelve=1&halfway=1"+"&remarks="+remarks);
            xhr.onload = function () {
                if (xhr.status === 200) {
                    alert("搁置成功！");
                    window.location.href = '/personal-center/process_management.html?type=我的待办&folw_type=&folw=&page=1&page_size=20&wd='
                }
             };
        }
    </script>
{% endblock %}
